﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASPNETDBTableAdapters;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ContentTableAdapter contentAdapter = new ContentTableAdapter();

        String idParam = Request.QueryString["navID"];
        if (idParam != null)
        {
            ContentRepeater.DataSource = contentAdapter.GetDataByNavigationID(int.Parse(idParam));
            ContentRepeater.DataBind();
        }
        else
        {
            ContentRepeater.DataSource = contentAdapter.GetContentItems();
            ContentRepeater.DataBind();
        }

        
    }
}